//
//  CharacterController.h
//  CompGraf2
//
//  Created by Juan Niosi on 04/10/11.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "MD2Entity.h"
#import "MapNode.h"

typedef enum CharacterState
{
    IDLE,
    WALKING,
} STATE;

@interface CharacterController : MD2Entity
{
    STATE state;
    NSMutableArray *movementQueue;
    GLfloat walkspeed;
    GLfloat turnspeed;
    bool turning;
    
    MapNode *currentPos;
    
    NSString *animIdle;
    NSString *animWalk;
    NSString *animAttack;
    NSString *animHit;
    
}
@property (nonatomic,retain) NSString *animIdle;
@property (nonatomic,retain) NSString *animWalk;
@property (nonatomic,retain) NSString *animAttack;
@property (nonatomic,retain) NSString *animHit;


- (id)init:(MD2Model *)md2 withWalkSpeed:(GLfloat)walk withTurnSpeed:(GLfloat)turn :(MapNode *)pos;

- (void)updateMove:(GLfloat)deltaTime;
- (void)setPath:(NSArray *)path;

- (BOOL)setState:(STATE)newState;
- (MapNode *)getCurrentObjective;
@end
